<!DOCTYPE html>
<html>
  <head>
    <script src="../dist/jspsych.js"></script>
    <script src="../dist/plugin-survey-text.js"></script>
    <link rel="stylesheet" href="../dist/jspsych.css">
  </head>
  <body></body>
  <script>

    var jsPsych = initJsPsych({
      on_finish: function() {
        jsPsych.data.displayData();
      }
    });

    var survey_page1 = {
      type: jsPsychSurveyText,
      questions: [
        {prompt: 'How old are you?', columns: 3, required: true, name: 'Age'},
        {prompt: 'Where were you born?', placeholder: 'City, State/Province, Country', columns: 50, name: 'BirthLocation'}
      ],
      randomize_question_order: true
    };

    var survey_page2 = {
      type: jsPsychSurveyText,
      questions: [
        {prompt: 'Tell me about your day', placeholder: 'How did it start?', rows:10, columns: 50}
      ]
    };

    jsPsych.run([survey_page1, survey_page2]);

  </script>
</html>
